Bases: ProgramOperationalMetric
Summed wall-clock seconds inside program calls; use for end-to-end time.
End-to-end wall-clock seconds spent inside program(...) during
this run. Sums per-invocation wall-clock; does not double-count
nested LM/EM calls.
Example:
program.compile(
metrics=[
synalinks.metrics.ProgramElapsedTime(),
],
)
Source code in synalinks/src/metrics/program_metrics.py
| @synalinks_export("synalinks.metrics.ProgramElapsedTime")
class ProgramElapsedTime(ProgramOperationalMetric):
"""Summed wall-clock seconds inside program calls; use for end-to-end time.
End-to-end wall-clock seconds spent inside `program(...)` during
this run. Sums per-invocation wall-clock; does not double-count
nested LM/EM calls.
Example:
```python
program.compile(
metrics=[
synalinks.metrics.ProgramElapsedTime(),
],
)
```
"""
def __init__(self, name="program_elapsed_time", description=None):
super().__init__(name=name, description=description)
def result(self):
return float(self._delta_program("invocation_elapsed_s"))
|